package com.atguigu.spring6.iocxml.resource;

import com.atguigu.spring6.iocxml.resource.controller.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import com.atguigu.spring6.config.SpringConfig;

public class TestUserControllerAnnotation {
    public static void main(String[] args) {
//        加载配置类
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(SpringConfig.class);
        UserController userController = applicationContext.getBean(UserController.class);
        userController.addUser();
    }
}
